import { createRouter, createWebHistory } from 'vue-router'
import HomePage from '../components/HomePage.vue'
import CreatePage from '../components/CreatePage.vue'
import RankPage from '../components/RankPage.vue'
import MyPage from '../components/MyPage.vue'
import StoryDetailPage from '../components/StoryDetailPage.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      component: HomePage
    },
    {
      path: '/create',
      component: CreatePage
    },
    {
      path: '/rank',
      component: RankPage
    },
    {
      path: '/favorite',
      component: MyPage
    },
    {
      path: '/story/:id',
      component: StoryDetailPage
    }
  ]
})

export default router